From 000e0c84201f4d8c2b3baee6701ef5555e163fc6 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 11 Nov 2009 13:11:44 +0000 Subject: [PATCH] blktap2: Remove gnu89-inline option from CFLAGS Not supported by older versions of gcc. Signed-off-by: Keir Fraser --- tools/blktap2/drivers/Makefile | 3 +-- tools/blktap2/drivers/hashtable_itr.c | 7 +++++++ tools/blktap2/drivers/hashtable_itr.h | 26 +++++--------------------- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/tools/blktap2/drivers/Makefile b/tools/blktap2/drivers/Makefile index 61b0153b5e..cd3336ad3c 100644 --- a/tools/blktap2/drivers/Makefile +++ b/tools/blktap2/drivers/Makefile @@ -49,8 +49,7 @@ REMUS-OBJS += hashtable.o REMUS-OBJS += hashtable_itr.o REMUS-OBJS += hashtable_utility.o -$(REMUS-OBJS): CFLAGS += -fgnu89-inline -I$(XEN_XENSTORE) - +$(REMUS-OBJS): CFLAGS += -I$(XEN_XENSTORE) LIBAIO_DIR = $(XEN_ROOT)/tools/libaio/src tapdisk2 tapdisk-stream tapdisk-diff $(QCOW_UTIL): AIOLIBS := $(LIBAIO_DIR)/libaio.a diff --git a/tools/blktap2/drivers/hashtable_itr.c b/tools/blktap2/drivers/hashtable_itr.c index b361386104..731917ccf1 100644 --- a/tools/blktap2/drivers/hashtable_itr.c +++ b/tools/blktap2/drivers/hashtable_itr.c @@ -5,6 +5,13 @@ #include "hashtable_itr.h" #include /* defines NULL */ +struct hashtable_itr { + struct hashtable *h; + struct entry *e; + struct entry *parent; + unsigned int index; +}; + /*****************************************************************************/ /* hashtable_iterator - iterator constructor */ diff --git a/tools/blktap2/drivers/hashtable_itr.h b/tools/blktap2/drivers/hashtable_itr.h index a67e7de504..81da83855d 100644 --- a/tools/blktap2/drivers/hashtable_itr.h +++ b/tools/blktap2/drivers/hashtable_itr.h @@ -5,17 +5,7 @@ #include "hashtable.h" #include "hashtable_private.h" /* needed to enable inlining */ -/*****************************************************************************/ -/* This struct is only concrete here to allow the inlining of two of the - * accessor functions. */ -struct hashtable_itr -{ - struct hashtable *h; - struct entry *e; - struct entry *parent; - unsigned int index; -}; - +struct hashtable_itr; /*****************************************************************************/ /* hashtable_iterator @@ -28,20 +18,14 @@ hashtable_iterator(struct hashtable *h); /* hashtable_iterator_key * - return the value of the (key,value) pair at the current position */ -extern inline void * -hashtable_iterator_key(struct hashtable_itr *i) -{ - return i->e->k; -} +void * +hashtable_iterator_key(struct hashtable_itr *i); /*****************************************************************************/ /* value - return the value of the (key,value) pair at the current position */ -extern inline void * -hashtable_iterator_value(struct hashtable_itr *i) -{ - return i->e->v; -} +void * +hashtable_iterator_value(struct hashtable_itr *i); /*****************************************************************************/ /* advance - advance the iterator to the next element -- 2.30.2